{{ define "main" }}
{{ $currentLang := $.Site.Language.Lang }}
<div id="content">
  <div id="frontcontainer">
    <div id="frontfeaturecontainer">
      <div id="frontfeatureleft">
        <div id="frontfeaturecontent">
          <h1>{{ i18n "freebsdProject" }}</h1>
          <p>
            {{ i18n "freebsdDescription1" }}
            <a href={{ "platforms/" | absLangURL }}>{{ i18n "freebsdDescription2" }}</a>
            {{ i18n "freebsdDescription3" }}
            <a href={{ printf "%s%s%s" "https://docs.FreeBSD.org/" $currentLang "/articles/contributors/#staff-committers" }}>{{ i18n "freebsdDescription4" }}</a>
            {{ i18n "freebsdDescription5" }}
            <a href={{ printf "%s%s%s" "https://docs.FreeBSD.org/" $currentLang "/books/handbook/introduction/#introduction-nutshell-users" }}>{{ i18n "freebsdDescription6" }}</a>
            {{ i18n "freebsdDescription7" }}
          </p>
          <div id="txtfrontfeaturelink"> »<a href={{ "about/" | absLangURL }} title={{ i18n "learnMore" }}>{{ i18n "learnMore" }}</a></div>
          <div id="txtfrontjournalblock">
            <br />»
            <span id="txtfrontjournallink">
            {{ i18n "getThe" }} <a href="https://freebsdfoundation.org/our-work/journal/" title={{ i18n "journal" }}>{{ i18n "journal" }}</a>
            </span>
          </div>
        </div>
      </div>
      <div id="frontfeaturemiddle">
        <div class="frontgetroundbox">
          <div class="frontgettop">
            <div>
              <b style="display: none">.</b>
            </div>
          </div>
          <div class="frontgetcontent">
            <a href={{ "where/" | absLangURL }}>{{ i18n "downloadFreeBSD" }}</a>
          </div>
          <div class="frontgetbot">
            <div>
              <b style="display: none">.</b>
            </div>
          </div>
        </div>
        <div id="frontreleases">
          <div id="frontreleasescontent" class="txtshortcuts">
            <h2>
              <a href={{ "releases/" | absLangURL }}>{{ i18n "supportedReleases" }}</a>
            </h2>
            <ul id="frontreleaseslist">
              <li>
                {{ i18n "production" }}:
                <a href={{ index $.Site.Data.releases "u-rel124-announce" }}>{{ index $.Site.Data.releases "rel124-current" }}</a>,
                <a href={{ index $.Site.Data.releases "u-rel131-announce" }}>{{ index $.Site.Data.releases "rel131-current" }}</a>,
                <a href={{ index $.Site.Data.releases "u-rel132-announce" }}>{{ index $.Site.Data.releases "rel132-current" }}</a>
              </li>
              {{ $betaUpcoming := index $.Site.Data.releases "beta-upcoming" }}
              {{ if ne $betaUpcoming "IGNORE" }}
                <li>
                  {{ i18n "upcoming" }}:
                  <a href={{ index $.Site.Data.releases "u-betarel-schedule" }}>{{ index $.Site.Data.releases "betarel-current" }}</a>
                </li>
              {{ end }}
              {{ $beta2Upcoming := index $.Site.Data.releases "beta2-upcoming" }}
              {{ if ne $beta2Upcoming "IGNORE" }}
                <li>
                  {{ i18n "upcoming" }}:
                  <a href={{ index $.Site.Data.releases "u-betarel2-schedule" }}>{{ index $.Site.Data.releases "betarel2-current" }}</a>
                </li>
              {{ end }}
              {{ $beta3Upcoming := index $.Site.Data.releases "beta3-upcoming" }}
              {{ if ne $beta3Upcoming "IGNORE" }}
                <li>
                  {{ i18n "upcoming" }}:
                  <a href={{ index $.Site.Data.releases "u-betarel3-schedule" }}>{{ index $.Site.Data.releases "betarel3-current" }}</a>
                </li>
              {{ end }}
              <li>
                <a href={{ "security/" | absLangURL }}#sup>{{ i18n "supportLifecycle" }}</a>
              </li>
            </ul>
          </div>
        </div>
      </div>
      <div id="frontfeatureright">
        <div id="languagenav">
          <ul id="languagenavlist">
            <!--
            {{ range $.Site.Home.AllTranslations }}
              <li><a href="{{ .Permalink }}">{{ .Language }}</a></li>
            {{ end }}
            -->
            <li><a href="{{ $.Site.BaseURL }}de">de</a></li>
            <li><a href="{{ $.Site.BaseURL }}">en</a></li>
            <li><a href="{{ $.Site.BaseURL }}fr">fr</a></li>
            <li><a href="{{ $.Site.BaseURL }}ja">ja</a></li>
            <li><a href="{{ $.Site.BaseURL }}zh-cn">zh-cn</a></li>
            <li><a href="{{ $.Site.BaseURL }}zh-tw">zh-tw</a></li>
          </ul>
        </div>
        <div id="frontshortcuts">
          <div id="frontshortcutscontent" class="txtshortcuts">
            <h2>{{ i18n "shortcuts" }}</h2>
            <ul id="frontshortcutslist">
              <li>
                <a href={{ "community/mailinglists/" | absLangURL }} title={{ i18n "mailingLists" }}>{{ i18n "mailingLists" }}</a>
              </li>
              <li>
                <a href={{ "support/bugreports/" | absLangURL }} title={{ i18n "reportingProblems" }}>{{ i18n "reportingProblems" }}</a>
              </li>
              <li>
                <a href={{ printf "%s%s%s" "https://docs.FreeBSD.org/" $currentLang "/books/faq/" }} title={{ i18n "FAQ" }}>{{ i18n "FAQ" }}</a>
              </li>
              <li>
                <a href={{ printf "%s%s%s" "https://docs.FreeBSD.org/" $currentLang "/books/handbook/" }} title={{ i18n "handbook" }}>{{ i18n "handbook" }}</a>
              </li>
              <li>
                <a href={{ "ports/" | absLangURL }} title={{ i18n "ports" }}>{{ i18n "ports" }}</a>
              </li>
            </ul>
          </div>
        </div>
        <div class="frontnewroundbox">
          <div class="frontnewtop">
            <div>
              <b style="display: none">.</b>
            </div>
          </div>
          <div class="frontnewcontent">
            <a href={{ "projects/newbies/" | absLangURL }}>{{ i18n "newFreeBSD" }}</a>
          </div>
          <div class="frontnewbot">
            <div>
              <b style="display: none">.</b>
            </div>
          </div>
        </div>
      </div>
    </div>
    {{ $language := "" }}
    {{ $currentLang := $.Site.Language.Lang }}
    {{ $siteBaseUrl := absLangURL ($.Site.BaseURL) }}

    {{ if ne $currentLang "en" }}
      {{ $language = $currentLang }}
    {{ end }}
    <div id="frontnemscontainer">
      <div id="frontnews">
        <div id="frontnewscontent" class="txtnewsevent">
          <h2>{{ i18n "latestNews" }}</h2>
          <div class="newseventswrap">
            {{ partial "news.html" . }}
            <div>
              <ul class="newseventslist">
                <li class="first-child">
                  <a href={{ printf "%s%s/%s" $siteBaseUrl $language "news/newsflash/" }} title={{ i18n "moreNews" }}>{{ i18n "moreNews" }}</a>
                </li>
                <li class="last-child">
                  <a href="{{ absLangURL ($.Site.BaseURL) }}news/feed.xml" title={{ i18n "rssNews" }}>
                  <img class="rssimage" src="{{ absLangURL ($.Site.BaseURL) }}images/ico_rss.png" alt={{ i18n "rssNews" }} width="27" height="12" />
                  </a>
                </li>
              </ul>
            </div>
          </div>
        </div>
      </div>
      <div class="frontseparator">
        <b style="display: none">.</b>
      </div>
      <div id="frontevents">
        <div id="fronteventscontent" class="txtnewsevent">
          <h2>{{ i18n "upcomingEvents" }}</h2>
          <div class="newseventswrap">
            {{ partial "events.html" . }}
            <a href={{ printf "%s%s/%s" $siteBaseUrl $language "events/" }} title={{ i18n "moreEvents" }}>{{ i18n "moreEvents" }}</a>
          </div>
        </div>
      </div>
      <div class="frontseparator">
        <b style="display: none">.</b>
      </div>
      <div id="frontmedia">
        <div id="frontmediacontent" class="txtnewsevent">
          <h2>{{ i18n "press" }}</h2>
          <div class="newseventswrap">
            {{ partial "press.html" . }}
            <a href={{ printf "%s%s/%s" $siteBaseUrl $language "press/" }} title={{ i18n "moreMedia" }}>{{ i18n "moreMedia" }}</a>
          </div>
        </div>
      </div>
      <div class="frontseparator">
        <b style="display: none">.</b>
      </div>
      <div id="frontsecurity">
        <div id="frontsecuritycontent" class="txtnewsevent">
          <h2>{{ i18n "securityAdvisories" }}</h2>
          <div class="newseventswrap">
            {{ partial "advisories.html" . }}
            <div>
              <ul class="newseventslist">
                <li class="first-child">
                  <a href={{ printf "%s%s/%s" $siteBaseUrl $language "security/advisories/" }} title={{ i18n "moreErrata" }}>{{ i18n "more" }}</a>
                </li>
                <li class="last-child">
                  <a href="{{ absLangURL ($.Site.BaseURL) }}security/feed.xml" title={{ i18n "rssSecurity" }}>
                  <img class="rssimage" src="{{ absLangURL ($.Site.BaseURL) }}images/ico_rss.png" alt="News RSS Feed" width="27" height="12" />
                  </a>
                </li>
              </ul>
            </div>
          </div>
          <br />
          <h2>{{ i18n "errataNotices" }}</h2>
          <div class="newseventswrap">
            {{ partial "errata-notices.html" . }}
            <div>
              <ul class="newseventslist">
                <li class="first-child">
                  <a href={{ printf "%s%s/%s" $siteBaseUrl $language "security/notices/" }} title={{ i18n "moreErrata" }}>{{ i18n "more" }}</a>
                </li>
                <li class="last-child">
                  <a href="{{ absLangURL ($.Site.BaseURL) }}security/feed.xml" title={{ i18n "rssSecurity" }}>
                  <img class="rssimage" src="{{ absLangURL ($.Site.BaseURL) }}images/ico_rss.png" alt="News RSS Feed" width="27" height="12" />
                  </a>
                </li>
              </ul>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
{{ end }}
